<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>JavaScript操作JSON</title>
    <script type="text/javascript">
        jsonObject = {
            add: function (x, y) {  // 定义函数
                return x + y;
            },
            "info": {
                title: "沐言科技",
                url: "www.yootk.com",
                get: function () {
                    return this.title + "：" + this.url;
                }
            }
        }
        console.log("【加法计算】" + jsonObject.add(10, 20));
        console.log("【信息获取】" + jsonObject.info.get())
    </script>
</head>
<body>
</body>
</html>
